package com.liuzhilong.infrastructure.basic.factory.statics.factory.auto;

import com.liuzhilong.infrastructure.basic.factory.statics.factory.Product;

public class AutoProduct1 implements Product {
    static {
        System.out.println("我在注册product1");

        AutoFactory.registerProduct("product1",()->{
            AutoProduct1 product1 = new AutoProduct1();

            //dosomelogic
            return product1;
        });
    }
    @Override
    public void doSome() {
        System.out.println("我是产品1");
    }
}
